package ro.romanescu.loc4j;

import java.net.URL;

/**
 * Localization interface provides the contract with the localization framework.
 * Users will use this interface to retrieve the actual implementation of the
 * framework.
 */
public interface Localization {

  
  /**
   * Configure the library from the given configuration file.
   * @param configurationFile Path to the configuration file
   * @throws LocalizationException If data is not correctly defined
   */
  public void configure( URL configurationFile ) throws LocalizationException;

  
  /**
   * Retrieve dictionary for a specified language code.
   * @param languageCode Language ISO code
   * @return Dictionary or null if no such code is loaded
   */
  public Dictionary getDictionary( String languageCode );

  
  /**
   * Retrieve the list of loaded dictionaries.
   * @return List of dictionaries loaded by the framework
   */
  public Dictionary[] getDictionaries();
}
